#!/bin/bash

JAVA_HOME="/opt/java/amazon-corretto-17.0.14.7.1-linux-x64/bin"
JVM_OPTS="-Xms512m -Xmx2048m"

cd /opt/guard

nohup $JAVA_HOME/java $JVM_OPTS -jar guard.jar > output.log 2>&1 &

echo "Application started with PID $!"
echo $! > pid.txt